@extends('backend::layout')
@section('title',trans($page_title))
@section('content')
    @component('backend::component.tpl_frame')
        @slot('page_title') <span class="text-danger">当前状态:{{config('shop.upgrade_status')[$info->status]}}</span> @endslot
        @slot('icon') hcl-status-sm @endslot

        @slot('body_content')
            @if($info)
                <h4 class="mb-2 text-dark" style="font-size: 1.01rem;"><i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>申请信息</h4>
                <table class="table table-bordered table-striped tbody info-card">
                    <tbody>
                    <tr><td>用户账号</td><td>支付金额</td><td>申请级别</td><td>订单状态</td><td>下单时间</td></tr>
                    <tr><td>{{$info->user->user_number}}<td>{{$info->pay_money}}</td></td>
                        <td>{{config('shop.level')[$info->up_after_level]}}</td> <td>{{config('shop.upgrade_status')[$info->status]}}</td>
                        <td>{{$info->created_at}}</td>
                    </tr>

                    </tbody>
                </table>

                @foreach($info->up_info as $item)
                    <div style="border-top: 5px solid red;margin-bottom: 10px;"></div>

                    <h4 class="mb-2 text-dark" style="font-size: 1.01rem;"><i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>审核信息</h4>
                    <table class="table table-bordered table-striped tbody info-card">
                        <tbody>
                        <tr><td>订单编号</td><td>审核账号</td><td>收款金额</td><td>审核级别</td><td>订单状态</td></tr>
                        <tr><td>{{$item->agent_sn}}</td><td>{{$item->HandUser['user_number']}}</td>
                            <td>{{$item->pay_money}}</td> <td>{{config('shop.level')[$item->up_after_level]}}</td> <td>{{config('shop.upgrade_hand_status')[$item->status]}}</td>
                        </tr>
                        <tr><td>下单时间</td><td>付款时间</td><td colspan="3">审核时间</td></tr>
                        <tr><td>{{$item->created_at}}</td> <td>@if($item->status>=1){{$item->paid_at}}@else未审核@endif</td> <td colspan="3">@if($item->status>=2){{$item->updated_at}}@else未审核@endif</td>
                        </tr>
                        </tbody>
                    </table>

                    <h4 class="mb-2 text-dark" style="font-size: 1.01rem;"><i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>审核人信息</h4>
                    <table class="table table-bordered table-striped tbody info-card">
                        <tbody>
                        <tr><td>审核人</td><td>联系方式</td></tr>
                        <tr><td>{{$item->HandUser['nickname']}}</td><td>{{$item->HandUser['user_phone']}}</td>
                        </tr>
                        </tbody>
                    </table>

                <h4 class="mb-2 text-dark" style="font-size: 1.01rem;"><i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>收款信息</h4>
                <table class="table table-bordered tbody info-card">
                    <tbody>
                    <tr class="table-secondary"><td>收款码</td><td>收款信息</td></tr>

                    <tr><td><img onclick="showImg(this.src)" style="height: 50px;" src="{{$item->HandUserInfo['receiving_code']}}"></td>
                        <td>微信：{{$item->HandUserInfo['weichat']}}<br/>支付宝：{{$item->HandUserInfo['alipay']}}</td>
                    </tr>
                    </tbody>
                </table>

               @if($item->status>=1)
                <h4 class="mb-2 text-dark" style="font-size: 1.01rem;"><i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>打款信息</h4>
                <table class="table table-bordered table-striped tbody info-card">
                    <tbody>
                    <tr><td>支付备注</td><td>打款凭证</td></tr>
                    <tr><td>{{$item->remark}}</td>
                        <td>
                            <img onclick="showImg(this.src)" height="120" class="mr-5" src="{{$item->voucher}}">
                        </td>
                    </tr>
                    </tbody>
                </table>
                @else
                    <h4 class="mb-2 text-dark" style="font-size: 1.01rem;"><i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>打款信息</h4>
                    <table class="table table-bordered table-striped tbody info-card">
                        <tbody>
                        <tr><td colspan="7" class="text-center">当前无打款信息</td></tr>
                        </tbody>
                    </table>
                @endif

                @endforeach

            @else
                @component('backend::public.empty_page')
                    @slot('info') 暂时没有订单详情 @endslot
                @endcomponent
            @endif
        @endslot
    @endcomponent
@endsection
